!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! define global variable used in other subroutine
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! coded by : B. G.
! created  : 2015-06-16
! revised  :
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! nomenclature:
!   Tt     total temperature, K
!   Pt     total presure, Pa
!   g      specific heat ratio, gamma
!   Rg     gas constant, 287.05 .....
!   p0     freestream pressure, Pa
!   yt     throat height, m
!   rtu    throat upstream arc radius, m
!   rtd    throat downstream arc radius, m
!   xa,ya  attachment point location, m
!   thetaa attachment point slope
!   thetae exit lip point slope
!   xe,ye  exit lip point axial and radical location
!   aw~dw    coefficients of wall function
!   da,de  slope of wall at the attachment and exit lip point
!   el     location tolerance, m
!   ev     velocity tolerance, m/s
!   pi     3.1415....
!   wallflag  1-upside wall, -1-downside wall
!   flagy40   1-y4>=0.0, 0-y4<0.0
!   flagshock shock occured
!   delta  0-planar flow, 1-axisymmetrical flow
!   Ny     throat height equalized spaced point number, odd
!   Nt     throat downstream arc equalized angle point number
!   Ni,Nj  calculate point number
!   x,y    point location
!   Vu,Vv  point velocity properties 
!   theta4 slope at point 4 on the wall
!   V      velocity
!   p      pressure
!   T      temperature
!   rou    density
!   M      Mach number
!   mdot   mass flow rate
!   F      thrust
!   Fs     1-d thrust without ambient pressure is taken into account
!   mdot1d 1-dimensional mass flow rate
!   F1d    1-dimensional thrust
!   CDm    mdot/mdot1d
!   etaF   F/F1d
!   etaI   I/I1d, etaF/CDm
!   Isp    specific impulse
!   Isp1d  1-d specific impulse
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

module VariableDef
   implicit none
   real*8::Tt,Pt,g,Rg,p0
   real*8::yt,rtu,rtd,xa,ya,thetaa,thetae,xe,ye,aw,bw,cw,dw,da,de
   real*8::el,ev,pi
   integer::wallflag,flagy40,flagshock,delta,Ny,Nt,Ni,Nj
   real*8::x1,y1,Vu1,Vv1,x2,y2,Vu2,Vv2,x3,y3,Vu3,Vv3,x4,y4,theta4,Vu4,Vv4,V4,p4,T4,rou4,M4
   real*8::mdot,F,Fs,mdot1d,F1d,CDm,etaF,etaI,Isp,Isp1d
end module VariableDef
